package com.medical.medical.mapper;

import com.medical.medical.entity.*;
import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.Select;

import java.util.List;

/**
         * @authorDesc 对酒当歌，人生几何！
         * @author WangLuDong
         * @date 2022-09-14 09:19:29
         * @version 1.0.0
         * @description 接口描述 医生-数据访问层
        */
public interface DoctorMapper {

     /**
      *@author WangLuDong
      *@Description 方法描述通过科室名称获取医生信息
      *@Date 2022-09-14 20:57:14
       * @param departmentId
      *@Return {@link null}
      */
    List<Doctor> getDoctorByDepartmentId(@Param("departmentId") int departmentId);

    int addrecord(Record record);

    int adddrug(@Param("recordId") int recordId,
                @Param("drugNumberAndIdList") List<DrugNumberAndId> drugNumberAndIdList);

    List<String> getDrugNum(String drugName);

    Drug getDrug(@Param("drugName") String drugName,
                 @Param("drugNum") String drugNum);


     /**
      *@author WangLuDong
      *@Description 方法描述
      *@Date 2022-09-16 09:43:24
      * @param departmentName
      * @param dName
      *@Return {@link null}
      */
    List<Doctor> getDoctorBydepartmentNameAndDName(String departmentName, String dName);

    /**
     * @Description: 登录验证
     * @author: 喜杨杨
     * @date: 2022/9/21 16:58
     * @param: [phone]
     * @return: com.medical.medical.entity.Doctor
     **/
    Doctor getLoginUser(String phone);

    List<Doctor> getDocListByDepartmentId(Integer departmentId);

    List<Doctor> getDoctorBydName(String dName);

    List<Patient> queryPatient(@Param("dId") int dId,
                               @Param("department") int department);

    String getDepartment(int doctorId);
}
